(function () {
  class Person {
    private name: string;
    protected age: number;
    constructor(name: string, age: number) {
      this.name = name;
      this.age = age;
    }
    get name1() {
        return this.name;
    }
    set name1(b) {
        this.name = b;
    }

  }
  let p1 = new Person('哪吒',7);
  console.log(p1.name1)
  p1.name1 = '唐僧';
  console.log(p1.name1)



})();